<!-- src/views/HomeView.vue -->
<template>
    <div style="position: relative;height: 640px;margin-bottom: 6px;" v-for="(item,index) in list" :key="index">
        <img :src="'../../public/index_background'+index+'.jpg'" />
        <div class="imageLeft">
            <div class="imageLeft_top">
                <img src="../../../public/OPPOAI.png" alt="">
                <div class="imageLeft_top2">{{ item.title }}</div>
                <div class="imageLeft_top3">{{ item.content }}</div>
            </div>
            <div class="imageLeft_bottom">
                <div class="imageLeft_bottom2" :class="{ 'active': item.status == 1}">{{ item.btn }}</div>
                <div class="imageLeft_bottom3">{{ item.bookNow }}</div>
            </div>
        </div>
    </div>
    <div style="position: relative;height: 640px;margin-bottom: 6px;">
        <div class="moreBox">
            <div class="moreBox_top">
                <div class="moreBox_topLeft">更多新品</div>
                <div class="moreBox_topRight">
                    <span>查看其它产品</span>
                    <img src="../../../public/Arrow-right.png" style="width: 7px;height: 14px;" />
                </div>
            </div>
            <div class="moreBox_bottom">
                <img src="../../../public/index_background4.jpg" alt="">
                <div class="moreBox_bottomLeft">
                    <div class="moreBox_bottomTop">
                        <img src="../../../public/OPPOAI.png" alt="">
                        <div class="moreBox_top2">OPPO Find N5</div>
                    </div>
                    <div class="moreBox_bottomBottom">
                        <span>钛薄了 太强了</span>
                        <div class="moreBox_bottomBottoml">
                            <span>了解更多</span>
                            <span>立即购买</span>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</template>
<script setup>
import { reactive } from 'vue';

const list = reactive([{
  title: 'OPPOAI Reno14系列',
  content: '放大此刻生命力',
  btn: '了解更多',
  bookNow: '立即预定',
  status: 0
},
{
  title: 'OPPO Pad SE ',
  content: '11 英寸护眼柔光屏',
  btn: '立即预定',
  bookNow: '',
  status: 0
},
{
  title: '全新 OPPO Find X8 系列',
  content: '哈苏联合研发',
  btn: '了解更多',
  bookNow: '立即购买',
  status: 0
},
{
  title: 'OPPO 2025 影像大赛',
  content: '',
  btn: '了解更多',
  bookNow: '',
  status: 1
}])
</script>
<style lang="scss" scoped>
img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.imageLeft {
  position: absolute;
  left: 50%;
  top: 0;
  max-width: 1312px;
  transform: translateX(-50%);
  width: 100%;
  padding-bottom: 64px;
  padding-top: 56px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 80%;
  .imageLeft_top {
    img {
      width: 94px;
      height: 20px;
    }
  }
  .imageLeft_top2 {
    font-size: 48px;
    line-height: 60px;
    font-weight: 700;
    color: #333;
  }
  .imageLeft_top3 {
    font-size: 24px;
    line-height: 32px;
    margin-top: 8px;
    font-weight: 600;
    color: #333;
  }
  .imageLeft_bottom {
    display: flex;
    align-items: center;
    .imageLeft_bottom2 {
      height: 40px;
      line-height: 40px;
      font-size: 14px;
      color: #fff;
      margin-right: 12px;
      padding: 0 20px;
      background: #000;
      border-radius: 36px;
      cursor: pointer;
    }
    .imageLeft_bottom3 {
      font-size: 14px;
      line-height: 22px;
      border-bottom: 1px solid #000;
      cursor: pointer;
    }
  }
  .active {
    background: #fff !important;
    color: #000 !important;
  }
}
.moreBox {
  position: absolute;
  left: 50%;
  top: 0;
  max-width: 1312px;
  transform: translateX(-50%);
  width: 100%;
  padding-bottom: 64px;
  padding-top: 56px;
  height: 80%;
  .moreBox_top {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    .moreBox_topLeft {
      font-size: 24px;
      line-height: 32px;
      color: #333;
    }
    .moreBox_topRight {
      cursor: pointer;
      display: flex;
      align-items: center;
      span {
        margin-right: 6px;
        opacity: 0.55;
        color: #000;
        font-size: 14px;
      }
    }
  }
  .moreBox_bottom {
    position: relative;
    width: 100%;
    height: 460px;
    margin-top: 40px;
    .moreBox_bottomLeft {
      .moreBox_bottomTop {
        position: absolute;
        top: 30px;
        left: 30px;
        img {
          width: 94px;
          height: 20px;
        }
        .moreBox_top2 {
          font-size: 32px;
          line-height: 40px;
        }
      }
    }
    .moreBox_bottomBottom {
      padding: 20px 16px;
      width: 254px;
      position: absolute;
      bottom: 8px;
      left: 8px;
      border-radius: 4px;
      background: #efede9;
      span {
        font-size: 16px;
        line-height: 24px;
        color: #000;
      }
    }
    .moreBox_bottomBottoml {
      align-items: center;
      display: flex;
      margin-top: 24px;
      span {
        color: #000;
        font-size: 14px;
        line-height: 22px;
        margin-right: 16px;
        border-bottom: 1px solid #000;
        cursor: pointer;
      }
    }
  }
}
</style>